<?php
    class NavigationView {
		
		private $m_getRegisterButton = "registerButton";
		private $m_getCompactListButton = "compactList";
		private $m_getFullListButton = "fullList";
		private $m_getDeleteButton = "delete";
		private $m_getEditMemberButton = "editMember";
		private $m_getViewMemberButton = "viewMember";
		private $m_getAddBoatButton = "addBoatInfo";
		private $m_getDeleteBoatButton = "deleteBoatButton";
		private $m_getEditBoatButton = "editBoatButton";
		
		
    	public function ShowStartButtons(){
    		return "
			<h2>Hej!</h2>
			<form method='POST'>
				<fieldset>
					<legend>Vad vill du göra?</legend>
						<input type='submit' value='Registrera Medlem' name='$this->m_getRegisterButton' id='registerButton' /><br />
						<input type='submit' value='Generera kompakt lista' name='$this->m_getCompactListButton' id='compactListButton' /><br />
						<input type='submit' value='Generera full lista' name='$this->m_getFullListButton' id='fullListButton' /><br />
						<input type='submit' value='Radera medlem' name='$this->m_getDeleteButton' id='deleteButton' /><br />
						<input type='submit' value='Ändra medlem' name='$this->m_getEditMemberButton' id='editMemberButton' /><br />
						<input type='submit' value='Visa medlem' name='$this->m_getViewMemberButton' id='viewMemberButton' /><br />
						<input type='submit' value='Lägg till båtinfo' name='$this->m_getAddBoatButton' id='addBoatInfoButton' /><br />
						<input type='submit' value='Radera båt' name='$this->m_getDeleteBoatButton' id='deleteBoatButton' /><br />
						<input type='submit' value='Ändra båt' name='$this->m_getEditBoatButton' id='editBoatInfoButton' /><br />
				</fieldset>
			</form>	
			";
    	}
    	
		public function TriedToRegisterMember(){
			if (isset($_POST[$this->m_getRegisterButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToGenerateCompactList(){
			if (isset($_POST[$this->m_getCompactListButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToGenerateFullList(){
			if (isset($_POST[$this->m_getFullListButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToDeleteMember(){
			if (isset($_POST[$this->m_getDeleteButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}

		public function TriedToEditMember(){
			if (isset($_POST[$this->m_getEditMemberButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToViewMember(){
			if (isset($_POST[$this->m_getViewMemberButton]) != null) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToAddBoatInfo(){
			if (isset($_POST[$this->m_getAddBoatButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToDeleteBoat(){
			if (isset($_POST[$this->m_getDeleteBoatButton]) == TRUE) {
				return TRUE;
			}
			else {
				return FALSE;
			}
		}
		
		public function TriedToEditBoat(){
			if (isset($_POST[$this->m_getEditBoatButton]) == TRUE) {		
			return TRUE;
			}
			else {
				return FALSE;
			}
		}	
	}
?>